<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>4： 实现时间的显示功能，(Date)
			要求能显示星期几，年月日，小时分钟秒</title>
		<script type="text/javascript">
			var date = new Date();
			var y = date.getFullYear();
			var m = date.getMonth() + 1;
			var d = date.getDate();
			var w = date.getDay();
			var h = date.getHours();
			var minute = date.getMinutes();
			var s = date.getSeconds();
			var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
			var week = weeks[w];
			console.log("现在的时间是：", y, "年", m, "月", d, "日", week, h, ":", minute, ":", s)
			console.log(date);
		</script>
	</head>
	<body>
	</body>
</html>
